package com.example.hctorisrael.deadolympics;

import org.andengine.entity.sprite.Sprite;
import org.andengine.opengl.texture.region.ITextureRegion;
import org.andengine.opengl.vbo.VertexBufferObjectManager;

/**
 * Created by HectorIsrael on 03/05/2015.
 */
public class Asteroide {
    private Sprite spriteAsteroide;

    public Asteroide(float x, float y, ITextureRegion regionAsteroide, VertexBufferObjectManager vbom) {
        spriteAsteroide = new Sprite(x,y,regionAsteroide,vbom);
    }

    public void mover(float dx, float dy) {
        spriteAsteroide.setPosition(spriteAsteroide.getX()+dx, spriteAsteroide.getY()+dy);
    }

    public Sprite getSpriteAsteroide() {
        return spriteAsteroide;
    }

    public void girar(int grados) {
        spriteAsteroide.setRotation(spriteAsteroide.getRotation()+grados);
    }
}
